package vip.fuxk.neav;

import org.noear.solon.core.route.PathRule;
import org.slf4j.helpers.MessageFormatter;
import vip.fuxk.neav.dto.SubAppRegisterDTO;

public interface Cons {

    interface SUB_APP {

        static String GROUP_KEY(String group) {
            return MessageFormatter.format("_sub_app_group_:{}",
                    group).getMessage();
        }

        static String HEARTBEAT_KEY(String group, String server) {
            return MessageFormatter.format("_sub_app_heartbeat_key_:{}:{}",
                    group, server).getMessage();
        }

        static String GROUP_SERVER_ACTIVE(String group) {
            return MessageFormatter.format("_sub_app_group_active:{}",
                    group).getMessage();
        }

        static String GROUP_DEFAULT_PATH(String group) {
            return MessageFormatter.format("/{}/**",
                    group).getMessage();
        }

        static String GROUP_PATH_RULE(String group) {
            return MessageFormatter.format("_sub_app_group_path_rule:{}",
                    group).getMessage();
        }



    }
}
